#version 450

layout (binding = 0) uniform sampler2D fontSampler;
layout (binding = 1) uniform sampler2D canvasSampler;

layout (location = 0) in vec2 inUV;
layout (location = 1) in vec4 inColor;
layout (location = 2) flat in int inCanvas;

layout (location = 0) out vec4 outColor;

void main() 
{
	vec4 color;
	if(inCanvas != 0) {
		color = texture(canvasSampler, inUV);
		color.a = 1.f;
	} else color = texture(fontSampler, inUV);
	outColor = inColor * color;
}